package com.cloud.wms.http.observer;

import com.cloud.core.http.error.AppException;

import io.reactivex.functions.Function;

/**
 * @Author:Chen
 * @Date: 2021-01-19 15:48
 * @Description:
 */
public class CheckNullFunc<T> implements Function<T, T> {

    @Override
    public T apply(T t) throws Exception {
        if (t == null) {
            throw new AppException("该信息缺失，请联系运维人员！");
        } else {
            return t;
        }
    }
}
